$(document).ready(
    function()
    {
        $('#button-upload-ytb').uploadify(
        {
        	buttonText:'Select Image',
        	swf :'/appweb/application/layouts/admin/upload/uploadify.swf',
            uploader: '/appweb/admin/product/upyoutube',
            fileTypeDesc:'Image file',
            fileTypeExts:'*.png;*.jpg;*.gif',
            fileObjName:'fileimg',
            onDialogOpen: function()
            {
            	$('#button-upload-ytb').uploadify(
            		'settings','formData',{'category': $('select#upload-video-category option:selected').val(),'product':$('select#upload-video-product option:selected').val(),'name':$('#name-video').val(),'date':$('#date-videoz').val(),'id_user':$('#code-user').text(),'path':$('#path-youtube').val()}
            	);
            },
            onUploadSuccess:function(file,data,response)
            {
            	alert(data);
            }
        }
        );
    }
);